/**  
 * All rights Reserved, Designed By DHC
 * @Title:  XmlStructureAssembler.java   
 * @Package com.dhcc.DRGsHosp.facade.impl.assembler   
 * @Description:    TODO(用一句话描述该文件做什么)   
 * @author: LiQingYang     
 * @date:   2017年4月26日 上午10:54:01   
 * @version V2.4.0 
 * @Copyright: 2017 DHC2013-2017. All rights reserved. 
 * 注意：本内容仅限于东华软件股份公司内部传阅，禁止外泄以及用于其他的商业目的
 */
package com.dhcc.DRGsHosp.facade.impl.assembler;

import com.dhcc.DRGsHosp.core.domain.XmlStructure;
import com.dhcc.DRGsHosp.facade.dto.XmlStructureDTO;

/**   
 * @ClassName:  XmlStructureAssembler   
 * @Description:TODO(这里用一句话描述这个类的作用)   
 * @author: LiQingYang 
 * @date:2017年4月26日 上午10:54:01   
 *     
 * @Copyright: 2017 DHC2013-2017, All rights reserved. 
 * 注意：本内容仅限于东华软件股份公司内部传阅，禁止外泄以及用于其他的商业目的 
 */
public class XmlStructureAssembler {

    public static XmlStructure  toEntity(XmlStructureDTO  xmlStructureDTO){
        if (xmlStructureDTO == null) {
            return null;
        }
        XmlStructure result  = new XmlStructure();
        result.setNodeId(xmlStructureDTO.getNodeId());
        result.setName(xmlStructureDTO.getName());
        result.setLevel(xmlStructureDTO.getLevel());
        result.setXpath(xmlStructureDTO.getXpath());
        result.setDataTypeCode(xmlStructureDTO.getDataTypeCode());
        result.setDataFormatCode(xmlStructureDTO.getDataFormatCode());
        result.setpType(xmlStructureDTO.getpType());
        result.setIsSameNode(xmlStructureDTO.getIsSameNode());
        result.setParentId(xmlStructureDTO.getParentId());
        result.setTable(xmlStructureDTO.getTable());
        result.setTableName(xmlStructureDTO.getTableName());
        result.setFieldDesc(xmlStructureDTO.getFieldDesc());
        result.setFieldCode(xmlStructureDTO.getFieldCode());
        result.setDataScale(xmlStructureDTO.getDataScale());
        result.setMapPosition(xmlStructureDTO.getMapPosition());
        result.setNpName(xmlStructureDTO.getNpName());
        result.setPropetyPosition(xmlStructureDTO.getPropetyPosition());
        result.setValueType(xmlStructureDTO.getValueType());
        result.setTemplateType(xmlStructureDTO.getTemplateType());
        return result;
     }
}
